package com.sx.gongzhong.pest;

import com.sx.gongzhong.model.HeadParamBean;
import com.sx.gongzhong.model.ReplyUserBean;
import com.sx.gongzhong.net.AppealManager;
import com.sx.gongzhong.net.BaseCallBack;
import com.sx.gongzhong.view.IVoidView;

import java.util.Map;

/**评价便民诉求
 * Created by admin on 2018/1/11.
 */

public class AddEvaluationPest {
    private IVoidView iVoidView;

    public AddEvaluationPest(IVoidView iVoidView) {
        this.iVoidView = iVoidView;
    }
    public void addEvaluation(String id, int evaluationLevel, String evaluationContent) {
        Map<String,Object> map = HeadParamBean.getHead();
        map.put("id",id);
        map.put("evaluationContent",evaluationContent);
        map.put("evaluationLevel",evaluationLevel);
        new AppealManager().addEvaluation(map, new BaseCallBack<ReplyUserBean.BaseResult<Void>>() {
            @Override
            public void onSuccess(ReplyUserBean.BaseResult<Void> response) {
                iVoidView.voidView("");
            }
            @Override
            public void onFailures(String message) {
                iVoidView.showError(message);
            }
        });
    }


}
